<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			window.onload = function(){
				document.getElementById("username").value = "admin";
					
				document.onmousemove = function(){
					document.getElementById("username").value = event.clientX +"," +event.clientY+","+event.offsetX+","+event.offsetY;
				}
				//鼠标按键
				document.onmousedown = function(){
					alert(event.button);
				}
			}
			function test(o){
				o.style.cssText = "border:2px solid blue";
			}
		</script>
		<style type="text/css">
			#testDiv{
				width: 200px;
				height: 200px;
				border: 1px solid blue;
			}
		</style>
	</head>
	<body>
		<input type="text" id="username" onfocus="test(this)"/>
		
		<div id="testDiv">
			
		</div>
		
		<table border="1" width="200">
			<tr onmouseover="this.style.backgroundColor = '#eee' "onmouseout ="this.style.backgroundColor = '#fff'">
				<td>1</td><td>2</td>
			</tr>
			<tr onmouseover="this.style.backgroundColor = '#eee' "onmouseout ="this.style.backgroundColor = '#fff'">
				<td>1</td><td>2</td>
			</tr>
			<tr onmouseover="this.style.backgroundColor = '#eee' "onmouseout ="this.style.backgroundColor = '#fff'">
				<td>1</td><td>2</td>
			</tr>
		</table>
	</body>
</html>
